package com.plan
/**
 * The ConstructionReportDetail entity.
 *
 * @author  michael.geng  mokesoft
 *
 *
 */
class ConstructionReportDetail {
    static mapping = {
         table 'pm_construction_report_detail'
         // version is set to false, because this isn't available by default for legacy databases
         version true
         id generator:'identity', column:'ID'
         parent column:'PARENT_ID'
    }
    Long id
    String quantitiesName
    String subProject
    String elevation
    String system
    String room
    String drawing
    String spec
    String installMethod
    String material
    String unit
    java.math.BigDecimal sum
    String team
    String remark
    // Relation
		static belongsTo = [parent:ConstructionReport]
		
    static constraints = {
        quantitiesName(size: 1..100, blank: false)
        subProject(size: 0..50)
        elevation(size: 0..50)
        system(size: 0..50)
        room(size: 0..50)
        drawing(size: 0..100)
        spec(size: 0..100)
        installMethod(size: 0..100)
        material(size: 0..100)
        unit(size: 0..50)
        sum(nullable: true)
        team(size: 0..50)
        remark(size: 0..500)
        parent()
    }
    String toString() {
        return "${id}" 
    }
}
